#!/usr/bin/env python

import sys
from xml.dom import minidom

import gbase
import getpass
from xml_helper import *
import gbase_template
import if_gbase
import pickle
from base64 import b64encode, b64decode
try:
    from bot_conf import conf
except:
    print "Can't read the configure file: bot_conf.py"
    print "maybe you must copy bot_conf.py.default to bot_conf.py"
    sys.exit(1)


def main():
	if_gbase.init(conf)

	test_obj = {
	'key1': 'sign',
	'user2': 'sign2'
	}

	objid = if_gbase.SaveObj('test_obj', test_obj)
	print objid

	clone_obj = if_gbase.LoadObj('test_obj')
	print type(clone_obj)
	print clone_obj

	#objid = if_gbase.StoreObj('persistence-title', TEST_DATA)
	#print objid
	#content = if_gbase.LoadObj(objid)
	#print content
	#if objid:
	#	if_gbase.DelObj(objid)
    
if __name__ == '__main__':
    main()
